Skip to content

Add localized C++ hover size and alignment text - #14797

Open
Colen Garoutte-Carson (Colengms) wants to merge 3 commits into
mainfrom
dev/coleng/size_and_alignment
Open

Colen Garoutte-Carson (Colengms) wants to merge 3 commits into
mainfrom
dev/coleng/size_and_alignment

Conversation

@Colengms

Copy link
Copy Markdown
Contributor

Adds the native localized Markdown template used to display C++ type size and alignment in hover.

This is the localization companion to a native cpptools implementation.

Keep size and alignment labels fully localizable while selecting singular and plural byte forms independently.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@Colengms
Colen Garoutte-Carson (Colengms) marked this pull request as ready for review September 25, 2026 23:06
},
"quick_info_size_many": {
"text": "**Size:** %s bytes",
"hint": "Size of a C or C++ type when the size is not one byte. %s is the size. {Locked=\"**\"} {Locked=\"%s\"}"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✨Copilot (agent224): [Minor] The *_many hints specify this template for every value other than 1, including the alignment pair below. We ship Czech, Polish, and Russian, where the byte unit differs for 2–4 versus 5+ (for example, Polish 2 bajty versus 5 bajtów; Czech 2 bajty versus 5 bajtů). One non-one template cannot express both forms when the native hover selects by == 1. Could we select locale-aware cardinal plural forms for the byte unit, or use a count-invariant localized abbreviation/wording, before consuming these strings?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✨Copilot (agent224): I also checked the pre-existing nativeStrings.json entries. On main, files_removed_from_database and parsing_files_processed each interpolate an arbitrary file count into one template; with 1, the checked-in Spanish and Brazilian Portuguese versions would render 1 archivos / 1 arquivos instead of 1 archivo / 1 arquivo. These entries predate your PR, and I have not verified which counts the native callers emit. Would you prefer to include a fix for these older cases in this PR, or have me investigate their callers and address any confirmed cases in a separate follow-up PR after this one merges?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Pull Request

Development

Successfully merging this pull request may close these issues.

2 participants